import request from '@/utils/request'

// 查询赠品设置列表
export function listGiveaway (query) {
  return request({
    url: '/manager/giveaway/list',
    method: 'get',
    params: query
  })
}

// 查询赠品设置详细
export function getGiveaway (id) {
  return request({
    url: '/manager/giveaway/' + id,
    method: 'get'
  })
}

// 新增赠品设置
export function addGiveaway (data) {
  return request({
    url: '/manager/giveaway',
    method: 'post',
    data: data
  })
}

// 修改赠品设置
export function updateGiveaway (data) {
  return request({
    url: '/manager/giveaway',
    method: 'put',
    data: data
  })
}

// 删除赠品设置
export function delGiveaway (id) {
  return request({
    url: '/manager/giveaway/' + id,
    method: 'delete'
  })
}


// 获取赠品列表
export function getGiveList () {
  return request({
    url: '/manager/giveaway/getGiveList',
    method: 'get'
  })
}